package com.qian.service.ddj.dao;

import com.qian.service.ddj.entity.DdjChangeCard;
import com.yaowk.service.common.BaseRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ChangeCardRepository extends BaseRepository<DdjChangeCard, Long> {
    @Query(value = "select * from ddj_change_card where user_id=?1",nativeQuery = true)
    List<DdjChangeCard> findByUserId(Integer userId);

    DdjChangeCard findFirst1ByUserIdOrderByIdDesc(Integer userId);
}
